.class Lcom/example/m6wmr/CartlistActivity$3;
.super Ljava/lang/Thread;
.source "CartlistActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/CartlistActivity;->getShopSource()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/CartlistActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/CartlistActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    .line 251
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 10

    .prologue
    .line 253
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 256
    :try_start_0
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    iget-object v6, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->helper:Ldbclass/DBOpenHelper;
    invoke-static {v6}, Lcom/example/m6wmr/CartlistActivity;->access$3(Lcom/example/m6wmr/CartlistActivity;)Ldbclass/DBOpenHelper;

    move-result-object v6

    invoke-virtual {v6}, Ldbclass/DBOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v6

    .line 257
    const-string v7, "select * from cart group by shopid"

    const/4 v8, 0x0

    .line 256
    invoke-virtual {v6, v7, v8}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    invoke-static {v5, v6}, Lcom/example/m6wmr/CartlistActivity;->access$4(Lcom/example/m6wmr/CartlistActivity;Landroid/database/Cursor;)V

    .line 258
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v5}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v5

    if-eqz v5, :cond_0

    .line 259
    :goto_0
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v5}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v5

    invoke-interface {v5}, Landroid/database/Cursor;->moveToNext()Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v5

    if-nez v5, :cond_2

    .line 267
    :cond_0
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v5}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v5

    if-eqz v5, :cond_1

    .line 268
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v5}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v5

    invoke-interface {v5}, Landroid/database/Cursor;->close()V

    .line 272
    :cond_1
    :goto_1
    new-instance v2, Landroid/os/Message;

    invoke-direct {v2}, Landroid/os/Message;-><init>()V

    .line 274
    .local v2, "msg":Landroid/os/Message;
    new-instance v5, Ljava/lang/StringBuilder;

    iget-object v6, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    iget-object v6, v6, Lcom/example/m6wmr/CartlistActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v6}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 275
    const-string v6, "/index.php?ctrl=app&action=collectshop&lat="

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    .line 276
    iget-object v6, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    iget-object v6, v6, Lcom/example/m6wmr/CartlistActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v6}, Lmyapp/MyApp;->getLat()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "&lng="

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    iget-object v6, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    iget-object v6, v6, Lcom/example/m6wmr/CartlistActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v6}, Lmyapp/MyApp;->getLng()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "&shopids="

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    .line 277
    iget-object v6, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->shopids:Ljava/lang/String;
    invoke-static {v6}, Lcom/example/m6wmr/CartlistActivity;->access$5(Lcom/example/m6wmr/CartlistActivity;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "&datatype=json"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    .line 274
    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 278
    .local v4, "url":Ljava/lang/String;
    const-string v5, "CartlistActivity"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "getShopSource() \u8c03\u7528\u8d2d\u7269\u8f66\u5546\u5bb6\u6570\u636e"

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 279
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    iget-object v5, v5, Lcom/example/m6wmr/CartlistActivity;->m:Lmyapp/MyApp;

    invoke-static {v4, v5}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v3

    .line 283
    .local v3, "str":Ljava/lang/String;
    :try_start_1
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, v3}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 285
    .local v1, "json":Lorg/json/JSONObject;
    const-string v5, "error"

    invoke-virtual {v1, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string v6, "true"

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_4

    .line 286
    invoke-static {}, Lmyapp/Util;->dismisDialog()V

    .line 288
    const-string v5, "msg"

    invoke-virtual {v1, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    iput-object v5, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 289
    const/4 v5, 0x1

    iput v5, v2, Landroid/os/Message;->arg1:I

    .line 290
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    iget-object v5, v5, Lcom/example/m6wmr/CartlistActivity;->h:Landroid/os/Handler;

    invoke-virtual {v5, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_1

    .line 312
    .end local v1    # "json":Lorg/json/JSONObject;
    :goto_2
    return-void

    .line 260
    .end local v2    # "msg":Landroid/os/Message;
    .end local v3    # "str":Ljava/lang/String;
    .end local v4    # "url":Ljava/lang/String;
    :cond_2
    :try_start_2
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->shopids:Ljava/lang/String;
    invoke-static {v5}, Lcom/example/m6wmr/CartlistActivity;->access$5(Lcom/example/m6wmr/CartlistActivity;)Ljava/lang/String;

    move-result-object v6

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-static {v6}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v7, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v6, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v6}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v6

    .line 261
    iget-object v8, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v8}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v8

    const-string v9, "shopid"

    invoke-interface {v8, v9}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v8

    invoke-interface {v6, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    .line 260
    invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    .line 261
    const-string v7, ","

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Lcom/example/m6wmr/CartlistActivity;->access$6(Lcom/example/m6wmr/CartlistActivity;Ljava/lang/String;)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto/16 :goto_0

    .line 264
    :catch_0
    move-exception v0

    .line 265
    .local v0, "e":Ljava/lang/Exception;
    :try_start_3
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 267
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v5}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v5

    if-eqz v5, :cond_1

    .line 268
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v5}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v5

    invoke-interface {v5}, Landroid/database/Cursor;->close()V

    goto/16 :goto_1

    .line 266
    .end local v0    # "e":Ljava/lang/Exception;
    :catchall_0
    move-exception v5

    .line 267
    iget-object v6, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v6}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v6

    if-eqz v6, :cond_3

    .line 268
    iget-object v6, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    # getter for: Lcom/example/m6wmr/CartlistActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v6}, Lcom/example/m6wmr/CartlistActivity;->access$2(Lcom/example/m6wmr/CartlistActivity;)Landroid/database/Cursor;

    move-result-object v6

    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 270
    :cond_3
    throw v5

    .line 293
    .restart local v1    # "json":Lorg/json/JSONObject;
    .restart local v2    # "msg":Landroid/os/Message;
    .restart local v3    # "str":Ljava/lang/String;
    .restart local v4    # "url":Ljava/lang/String;
    :cond_4
    :try_start_4
    const-string v5, "msg"

    invoke-virtual {v1, v5}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_5

    .line 294
    invoke-static {}, Lmyapp/Util;->dismisDialog()V

    .line 295
    const/4 v5, 0x2

    iput v5, v2, Landroid/os/Message;->arg1:I

    .line 296
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    iget-object v5, v5, Lcom/example/m6wmr/CartlistActivity;->h:Landroid/os/Handler;

    invoke-virtual {v5, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_4
    .catch Lorg/json/JSONException; {:try_start_4 .. :try_end_4} :catch_1

    goto :goto_2

    .line 304
    .end local v1    # "json":Lorg/json/JSONObject;
    :catch_1
    move-exception v0

    .line 306
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 307
    invoke-static {}, Lmyapp/Util;->dismisDialog()V

    .line 309
    const/4 v5, 0x5

    iput v5, v2, Landroid/os/Message;->arg1:I

    .line 310
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    iget-object v5, v5, Lcom/example/m6wmr/CartlistActivity;->h:Landroid/os/Handler;

    invoke-virtual {v5, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto/16 :goto_2

    .line 300
    .end local v0    # "e":Lorg/json/JSONException;
    .restart local v1    # "json":Lorg/json/JSONObject;
    :cond_5
    :try_start_5
    invoke-static {}, Lmyapp/Util;->dismisDialog()V

    .line 301
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    invoke-static {v5, v3}, Lcom/example/m6wmr/CartlistActivity;->access$7(Lcom/example/m6wmr/CartlistActivity;Ljava/lang/String;)V

    .line 302
    const/4 v5, 0x3

    iput v5, v2, Landroid/os/Message;->arg1:I

    .line 303
    iget-object v5, p0, Lcom/example/m6wmr/CartlistActivity$3;->this$0:Lcom/example/m6wmr/CartlistActivity;

    iget-object v5, v5, Lcom/example/m6wmr/CartlistActivity;->h:Landroid/os/Handler;

    invoke-virtual {v5, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_5
    .catch Lorg/json/JSONException; {:try_start_5 .. :try_end_5} :catch_1

    goto/16 :goto_2
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 314
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 315
    monitor-exit p0

    return-void

    .line 314
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
